package com.xw.kotlinlib.network

import java.lang.Exception

/**
 * 协程请求结果聚合结果.
 */
sealed class TResult<out T : Any> {

    data class Success<out T : Any>(val data: T?): TResult<T>()
    data class Error(val exception: Exception): TResult<Nothing>(){
        init {
            exception.printStackTrace()
        }
    }
}